package cn.edu.zafu.bigdata.weier;

public class Circle extends Shape {
    private double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    // 实现area()方法
    @Override
    public double area() {
        return Math.PI * radius * radius;
    }

    // 实现perimeter()方法
    @Override
    public double perimeter() {
        return 2 * Math.PI * radius;
    }
}